Many different types of so-called "special-effects" can be created using digital imaging techniques. One such class of special-effects techniques involves inserting the foreground of one image into a different background image. This makes it possible for a person or object to appear to be in a different setting than they really are. For example, the weatherman can appear to be standing in front of a weather map, when in reality he is standing in front of a blue wall, or an actor can appear to be standing on the edge of a cliff, when in reality he is actually performing in the safety of a studio. Typically, these methods rely on having the foreground object photographed in front of a brightly colored backdrop of a known color. A common backdrop color is blue, which is why this technique is often referred to as "blue-screening."
The basic steps involved with implementing a typical blue-screening algorithm are illustrated in FIG. 1. First, an object is photographed in front of a brightly colored backdrop of a known color which is shown as an image capture step 10. The captured image will contain a foreground region corresponding to the object being photographed, and a key color region, corresponding to the brightly colored backdrop. The key color region has a key color such as bright green or bright blue.
A segmentation step 12 is next used to segment the captured image into the foreground region and the key color region by detecting portions of the image that have the key color. Since the color of the backdrop will not be perfectly constant, the key color will typically be characterized by a range of color values surrounding some nominal color value, rather than a single point in color space.
Many blue-screening algorithms also include a transition signal creation step 14. This is useful because the image will typically contain some foreground pixels that have been contaminated by the key color. For example, the pixels that occur along the boundary between the foreground region and the key color region usually contain a mixture of foreground color and key color. The transition signal is determined to indicate the relative amount of foreground color and key color contained in each contaminated pixel.
Finally, an image composition step 16 is used to combine the foreground region of the captured image with a second background image. During this step, the foreground region of the captured image is inserted into the background image. For the foreground pixels that were determined to be contaminated with the key color, the transition signal can be used to remove the appropriate amount to key color and replace it with the corresponding background image.
Several methods have been disclosed in the prior art for the transition control signal generation step 14 shown in FIG. 1. These methods generally involve converting the image data into a luminance-chrominance color space representation, such as the well-known YCrCb or CIELAB color spaces. Examples of different control signal generation approaches that can be found in prior art are shown in FIG. 2. See U.S. Pat. Nos. 4,533,937, 5,301,016, 5,444,496, and 5,455,633. In each of these examples a key color region is shown. FIG. 2(a) shows a first vector 20 extending from the origin of the Cr-Cb chrominance plane to the key color location 21, and a second vector 22 that extends from a pixel color value 23 to the nearest transition boundary in the same vectorial direction as the first vector 20. The length of the first vector 20 will be referred to as D.sub.kc, and the length of the second vector 22 will be referred to as D. The corresponding control signal is calculated by k=D/D.sub.kc.
FIG. 2(b) shows a key color region 24 where k=1and a foreground region 25 where k=0. Values of k that fall in between 0 and 1 are computed via radial interpolation with respect to the center of the key color region 24.
FIG. 2(c) shows another method for computing a control signal for transition pixels in an image. A color location of a key color region 26 is defined, as well as a color location of a foreground picture signal region 27 corresponding to a foreground portion of the image. For a transition pixel with a color location 28, a control signal k is computed by the equation k=(Lx-L)/Lx, where Lx is the distance between the color location of the foreground picture signal region and the color location of the key color, and L is the distance between the color location of a transition pixel and the color location of the key color.
All of the previous prior art methods use different ways to determine what is a transition region pixel. However, they all have the disadvantage that colors in the digital image that are within the part of color space identified as transition will be categorized as part of the transition region. For example, if a subject was wearing a shirt similar in color and lightness to the key color, all of these methods would incorrectly identify the pixels of the subjects shirt as either part of the key color region, or if the shirt was slightly different the pixels would be categorized as part of the transition region. The pixels making up the subject's shirt, however, should be classified as part of the foreground region. The methods previously described would compute a control signal that was inaccurate due to the incorrect identification of the pixels of the subject's shirt.